From: Shih-Yuan Lee (FourDollars) Date: Fri, 9 Jun 2017 10:26:11 +0000 (+0800) Subject: ui: Reset workspace thumbnail porthole on monitor changes X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~253 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=4427197343e5facc7e695bebe2f0d74dae1ac666;p=gnome-shell.git ui: Reset workspace thumbnail porthole on monitor changes The porthole will not be destroyed when the scale factor changed. That makes workspace thumbnail porthole still wrong size in the first seeing after the scale factor changed. https://bugzilla.gnome.org/show_bug.cgi?id=765011 --- diff --git a/js/ui/workspaceThumbnail.js b/js/ui/workspaceThumbnail.js index 980ffd665..c5472bb2b 100644 --- a/js/ui/workspaceThumbnail.js +++ b/js/ui/workspaceThumbnail.js @@ -676,6 +676,12 @@ const ThumbnailsBox = new Lang.Class({ this._settings = new Gio.Settings({ schema_id: OVERRIDE_SCHEMA }); this._settings.connect('changed::dynamic-workspaces', Lang.bind(this, this._updateSwitcherVisibility)); + + Main.layoutManager.connect('monitors-changed', Lang.bind(this, function() { + this._destroyThumbnails(); + if (Main.overview.visible) + this._createThumbnails(); + })); }, _updateSwitcherVisibility: function() {